<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
		function changeImg()
		{
			var s=document.getElementById("tip");
			//alert("原来的位置："+s.align);
			s.align="center";
			s.innerHTML="美丽的合肥";
			//s.innerHTML
			//s.innerText
			var p=document.getElementById("tu");
			p.src="../img/3.jpg";
			p.width=1000;
			p.height=900;
		}
		function showCity()
		{
			var c=document.getElementsByName("city");
			var s="";
			for(var i=0;i<c.length;i++)
			{
				if(c[i].checked)
					s+=c[i].value+"&nbsp;&nbsp;";
			}
			document.getElementById("sel").innerHTML=s;
		}
		function FillDiv()
		{
			var d=document.getElementById("msg");
			//d.innerText="<h3 style='color:red;font-size:100px'>费子豪是江北第二帅哥！</h3>";
			d.innerHTML="<h3 style='color:red;font-size:100px'>费子豪是江北第二帅哥！</h3>";
			
		}
		</script>
	</head>
	<body>
		<h2 id="tip" align="left">美丽的九寨沟</h2>
		<img src="../img/1.jpg" id="tu"  />
		<form>
			<p>
				你最想去工作的城市:
				<input type="checkbox" name="city" value="hefei"/>合肥
				<input type="checkbox" name="city" value="shanghai"/>上海
				<input type="checkbox" name="city" value="beijing"/>北京
				<input type="checkbox" name="city" value="guangzhou"/>广州
				<label id="sel"></label>
			</p>
		</form>
		<input type="button" value="换文字和图片" onclick="changeImg()"/>
		<input type="button" value="你选择的城市" onclick="showCity()"/>
		<div id="msg" style="border: 10px solid red;"></div>
		<input type="button" value="fill div"  onclick="FillDiv()"/>
	</body>
</html>
